#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

//每一个宏，对应的数值，只有一个比特位是1，彼此位置不能重复
#define ONE (1<<0)
#define TWO (1<<1)
#define THREE (1<<2)
#define FOUR (1<<3)

void show(int flags){
  if(flags & ONE) printf("one\n");
  if(flags & TWO) printf("two\n");
  if(flags & THREE) printf("three\n");
  if(flags & FOUR) printf("four\n");
}


int main(){
 // show(ONE);
 // printf("-----------------------\n");
 // show(ONE | TWO);
 // printf("-----------------------\n");
 // show(ONE | TWO | THREE);
 // printf("-----------------------\n");
 // show(ONE | TWO | THREE | FOUR);
 // printf("-----------------------\n");
 //
 printf("stdin->fd:%d\n",stdin->_fileno);
 printf("stdout->fd:%d\n",stdout->_fileno);
 printf("stderr->fd:%d\n",stderr->_fileno);


}
